home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / E-G / Externals.cpt / Externals / card_4235.txt < prev    next >
Text File  |  1989-02-26  |  1KB  |  53 lines

  1. -- card: 4235 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2795
  5. -- name: EnableMenu
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=315 top=307 right=329 bottom=379
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Demo
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   push this card
  23.   visual effect iris open
  24.   go to card id 10546
  25. end mouseUp
  26.  
  27.  
  28.  
  29. -- part contents for background part 20
  30. ----- text -----
  31. 5
  32.  
  33. -- part contents for background part 1
  34. ----- text -----
  35. XCMD
  36.  
  37. -- part contents for background part 22
  38. ----- text -----
  39. EnableMenu menuNumber, itemNumber, TRUE/FALSE
  40.  
  41. -- part contents for background part 13
  42. ----- text -----
  43. EnableMenu is an XCMD that lets you enable and disable items in menus you've created using the NewMenu XFCN.  Examples:
  44.  
  45.   EnableMenu myMenu, 1, FALSE 
  46.   EnableMenu myMenu, 3, (the userLevel>2)
  47.  
  48. The first example will always disable the first menu item in the menu "myMenu".  The second example will disable the third item in "myMenu" IF the userLevel is greater than 2.
  49.  
  50. Passing an item number of 0 (zero) will enable or disable the ENTIRE menu.
  51.  
  52. The menu number you provide to to EnableMenu should be the same number that was returned by NewMenu.
  53.